﻿<%@ Page Title="Create Comment" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Create_Comment.aspx.cs" Inherits="admin_Create_Comment" %>

<asp:Content ID="Head" ContentPlaceHolderID="head" runat="Server">
    <link href="../styles/admin.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="top_menu">
        <div id="help_button">
            help
        </div>
                   <div id="logout">
            <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="../Default.aspx"
                OnLoggingOut="LoginStatus1_LoggingOut" />
        </div>
    </div>
    <div id="page_title">
        ADMINISTRATION
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="left_content">
        <div class="menu">
            <ul>
                <li><a href="Home.aspx">Home</a></li>
                <li><a href="Mng_Client.aspx">Manage Clients</a></li>
                <li><a href="Mng_Site.aspx">Manage Sites</a></li>
                <li><a href="Mng_Machine.aspx">Manage Machines</a></li>
                <li><a href="Mng_Comp.aspx">Manage Components</a></li>
                <li><a href="#" class="current">Create Comment</a></li>
                <li><a href="Mng_WO.aspx">Manage Work Order</a></li>
                <li><a href="Mng_FaultsRecom.aspx">Manage Faults Recommendation</a></li>
            </ul>
        </div>
    </div>
    <!-- end of left content -->
    <div id="right_content">
        <div class="content_area">
            <h2>
                Create Component
            </h2>
            <div class="form_box1">
                <asp:FormView ID="FormViewComment" runat="server" DataKeyNames="comment_id" DataSourceID="StdCommentsObjectDataSource"
                    DefaultMode="Insert" OnItemInserted="FormViewComment_ItemInserted">
                    <InsertItemTemplate>
                        <table>
                            <tr>
                                <td class="label1">
                                    Status:
                                </td>
                                <td colspan="2">
                                    <asp:DropDownList ID="statusDropDownList" runat="server" DataSourceID="StatusObjectDataSource"
                                        DataTextField="statusName" DataValueField="status_id" SelectedValue='<%# Bind("status_id") %>'
                                        CssClass="dropDownList">
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="StatusObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}"
                                        SelectMethod="GetData" TypeName="DataAccess.i2iPortalTableAdapters.StatusTableAdapter">
                                    </asp:ObjectDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td colspan="2">
                                    <asp:RequiredFieldValidator ID="commentDescriptionRequiredFieldValidator" runat="server"
                                        ErrorMessage="Comment Description is required." ControlToValidate="commentDescriptionTextBox"
                                        ValidationGroup="FormViewComment" CssClass="requiredFieldValidator">
                                    </asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="label1">
                                    Comment Description:
                                </td>
                                <td colspan="2">
                                    <asp:TextBox ID="commentDescriptionTextBox" runat="server" Text='<%# Bind("commentDescription") %>'
                                        TextMode="MultiLine" CssClass="fields" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td class="Li_buttonC">
                                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                                        Text="Insert" ValidationGroup="FormViewComment" />
                                </td>
                                <td class="Li_buttonC">
                                    <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                                        Text="Cancel" OnClick="InsertCancelButton_Click" />
                                </td>
                            </tr>
                        </table>
                        <br />
                    </InsertItemTemplate>
                    <ItemTemplate>
                        comment_id:
                        <asp:Label ID="comment_idLabel" runat="server" Text='<%# Eval("comment_id") %>' />
                        <br />
                        commentDescription:
                        <asp:Label ID="commentDescriptionLabel" runat="server" Text='<%# Bind("commentDescription") %>' />
                        <br />
                        status_id:
                        <asp:Label ID="status_idLabel" runat="server" Text='<%# Bind("status_id") %>' />
                        <br />
                        <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
                            Text="New" />
                    </ItemTemplate>
                </asp:FormView>
                <asp:ObjectDataSource ID="StdCommentsObjectDataSource" runat="server" InsertMethod="Insert"
                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DataAccess.i2iPortalTableAdapters.StandardCommentsTableAdapter">
                    <InsertParameters>
                        <asp:Parameter Name="commentDescription" Type="String" />
                        <asp:Parameter Name="status_id" Type="Int32" />
                    </InsertParameters>
                </asp:ObjectDataSource>
            </div>
        </div>
    </div>
    <!-- end of right content -->
</asp:Content>
